home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / Implementation / Dialogs / AboutBox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-13  |  917 b   |  48 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        AboutBox.h
  3.  
  4.     Contains:    Inline function to display About Box
  5.  
  6.     Owned by:    Chris Linn
  7.  
  8.     Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <1>     10/4/96    CSL        first checked in
  13. */
  14.  
  15. #ifndef _ABOUTBOX_
  16. #define _ABOUTBOX_
  17.  
  18. #ifndef _USELIB_
  19. #include "UseLib.h"
  20. #endif
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. class ODWindowState;
  27. struct Environment;
  28.  
  29. typedef void (*ShowAboutBoxEntry)( Environment* ev, ODWindowState* windowState );
  30.  
  31. inline void ShowAboutBox( Environment* ev, ODWindowState* windowState )
  32. {
  33.     // This inline function loads & unloads the Dialogs library
  34.     const StringPtr kODDialogsLib = "\pDialogsLib";
  35.     const StringPtr kODShowAboutBoxSymbol = "\pShowAboutBoxEntry";
  36.  
  37.     CUsingLibrary dialogs( kODDialogsLib );
  38.  
  39.     (*((ShowAboutBoxEntry)dialogs.GetEntry( kODShowAboutBoxSymbol )))
  40.         ( ev, windowState );
  41. }
  42.  
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46.  
  47. #endif
  48.